package brian.android.mvc;

import android.os.Bundle;
import android.widget.TextView;
import brian.android.mvc.activity.AbstractActivity;
import brian.android.mvc.annotation.Activity;
import brian.android.mvc.annotation.Event;
import brian.android.mvc.annotation.Inject;
import brian.android.mvc.bean.BeanFactory;
import brian.android.mvc.bo.MockBo;
import brian.android.mvc.exception.IllegalActivityMethodNameException;

public class Main extends AbstractActivity {
	private TextView result;
	
	@Inject
	private MockBo mockBo;

	@Override
	protected void initBeforeViewSet(Bundle savedInstanceState) {
		BeanFactory.setBeanConfig(MyBeanConfig.class);
	}
	
	public TextView getResult() {
		return result;
	}
	
	public MockBo getBo() {
		return mockBo;
	}
	
	@Activity(layout=R.layout.create_note)
	public void createNote() {
	}
	
	@Event
	public void onClickCreateNote() throws IllegalActivityMethodNameException {
		redirectActivity("createNote");
	}
	
	@Override
	protected int getContentView() {
		return R.layout.main;
	}
}
